<template>
  <div>
    <header>
      <a-row>
        <a-col :span="12">
          <span class="title">{{ title }}</span>
        </a-col>
        <a-col :span="12" align="right">
          <a href="javaScript:(0)" @click="goBack()"
            ><span class="iconfont iconfanhui"></span> 返回</a
          >
        </a-col>
      </a-row>
    </header>
    <slot name="content"></slot>
  </div>
</template>

<script>
import "@/assets/fonticon/iconfont.css";
import { Row, Col } from "ant-design-vue";
export default {
  name: "index",
  components: {
    aRow: Row,
    aCol: Col
  },
  props: {
    title: {
      type: String,
      default: "header"
    },
    showBackBtn: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    goBack() {
      this.$router.go(-1);
    }
  }
};
</script>

<style scoped lang="less">
header {
  padding-bottom: 2.625rem;
  border-bottom: 2px solid @border-color-base;
  font-size: 1.3rem;
  font-family: MicrosoftYaHei;
  color: rgba(68, 68, 68, 1);
  margin-bottom: 2.625rem;
  .title {
    font-weight: bold;
    letter-spacing: 0.1rem;
  }
}
</style>
